def f1(n):
    if n<=3 :
        return 1
    else:
        return f1(n-3)+f1(n-2)+f1(n-1)
a=[0]*20
for i in range(1,21):
    a[i-1]=f1(i)
print(a)

